<%--
  Created by IntelliJ IDEA.
  User: 86134
  Date: 2024/10/14
  Time: 14:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加宠物</title>
</head>
<body>
    <h2>添加宠物</h2>
    <% String error = (String) request.getAttribute("error"); %>
    <% if (error != null) { %>
        <p style="color: red;"><%= error %></p>
    <% } %>
    <form action="<%= request.getContextPath() %>/addPet" method="post">
        宠物名称：<input type="text" name="petName" required><br>
        宠物品种：<input type="number" name="petBreed" required><br>
        宠物性别：<input type="number" name="petSex" required><br>
        生日：<input type="date" name="birthday" required><br>
        描述：<textarea name="description" rows="4" cols="50"></textarea><br>
        <input type="submit" value="添加宠物">
    </form>
</body>
</html>

